#!/usr/bin/env python 

from string import ascii_lowercase as lowercase

import requests

def urliter(): 
    for i in xrange(100) : 
        print "%d/100" % i 
        for j in lowercase : 
            for k in lowercase : 
                yield "http://www.%02d%c%c%c%c.com" % (i, j, k, j, k) 
                

def main():
    with open("findsomewebsites.log", "w") as f:
        for u in urliter() : 
            try : 
                r = requests.get(u, timeout=6)
                r.raise_for_status()
                print "find: " + u 
                f.write(u + "\n") 
            except : 
                pass 
        pass

if __name__ == "__main__":
    main()

